package com.example.myproject.dao;

import com.example.myproject.entity.Person;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface PersonRepository extends JpaRepository<Person,Integer> {
/**
 * 通过年龄来查询
 * 方法名固定findByAge
 * @param age
 * @return
 * */
    public List<Person> findByAge(Integer age);
}
